def procDubboTest(beanGetter) {
    def logger = org.slf4j.LoggerFactory.getLogger(this.getClass());
    def vendorId = "1226"
    def userId = thisParam.get("userId");
    Map<Long, Integer> channelMap = new HashMap<>();
    channelMap.put(0l, 100000);
    channelMap.put(1l, 200000);
    channelMap.put(2l, 430000);

    def dubboInterface = beanGetter.get("assetsPayApi");
    def orderNo = System.currentTimeMillis() + userId
    def tradeOption = new com.dmall.pay.common.sdk.trade.TradeNumberOption()
    tradeOption.dmallVendorId = vendorId
    tradeOption.userId = userId
    tradeOption.orderNo = orderNo
    tradeOption.syncProcess = true

    def tradeNo = com.dmall.pay.common.sdk.trade.TradeNumber.createDmallModeTradeNumber(tradeOption)

    def payContext = new com.dmall.pay.common.sdk.para.PayContext("channel-assets-yoda", UUID.randomUUID().toString());
    payContext.platform = "IOS";
    payContext.userId = Long.parseLong(userId);
    payContext.vendorId = vendorId;
    payContext.storeId = "432";

    def payDubboReq = new com.dmall.pay.assets.sdk.domain.pay.PayRequest();
    payDubboReq.orderNo = orderNo;
    payDubboReq.orderType = 1;
    payDubboReq.orderSaleType = 18;
    payDubboReq.businessType = 2
    payDubboReq.platform = "IOS";
    payDubboReq.tradeNo = tradeNo
    payDubboReq.payFee = 1l
    payDubboReq.payChannelId = channelMap.get(Long.parseLong(userId) % 3)


    def dubboRst = dubboInterface.pay(payContext, payDubboReq);
    if (dubboRst == null) {
        logger.info("pay(fail): result is null,context:" + com.alibaba.fastjson.JSON.toJSONString(payContext))
        return true;
    } else {
        if (dubboRst.isSuccess() || dubboRst.msg == "压测用户余额不足[stresstest]") {
            logger.info("pay(succ):result:{},context:{}", com.alibaba.fastjson.JSON.toJSONString(dubboRst), com.alibaba.fastjson.JSON.toJSONString(payContext))
        } else {
            logger.info("pay(fail):result:{},context:{}", com.alibaba.fastjson.JSON.toJSONString(dubboRst), com.alibaba.fastjson.JSON.toJSONString(payContext))
        }
        return true;
    }
}